Release 10.1A: OpenEdge Development:
Java Open Clients


Unknown value (?) as a parameter

The Unknown value (?) is mapped to a Java object with a null value. The int, boolean, and long data types, however, are intrinsic types, not Java classes, so the null value does not belong to the set of values they support. If a proxy is defined to support Progress Unknown value (?) in ProxyGen, parameters that otherwise would be intrinsic data types are generated as Java classes. For example, ProxyGen generates an Integer parameter instead of an int, a Boolean parameter instead of a boolean, and a Long parameter instead of long.

The following is an example of a proxy method signature that does not support Progress Unknown value (?) for the first and third parameters:

foo(int, Date, boolean) 

This is an example of a proxy method that allows all the parameter values to be Unknown value (?):

foo(Integer, Date, Boolean) 

Arrays and Unknown value (?)

Since arrays are Java objects, they can be assigned the null value.

However, int[ ], boolean[ ], and long[ ] are arrays of intrinsic types, so the individual elements of the array cannot be null. The int[ ], boolean[ ], or long[ ] array as a whole can be null, which means that every element of the array on the AppServer will be UNKNOWN. If you want to assign Unknown value (?) to individual array elements, use the Allow Unknown check box in ProxyGen, and the generated proxy will contain Integer[ ], Boolean[ ] or Long[ ] for the parameter instead of int[ ], boolean[ ], or long[ ], respectively.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095